<?php
/**
 * @link https://ym2.cleverstone.top
 * @copyright Copyright (c) 2020 Yii Manager Software LLC
 */

namespace builder\tree_table\util\ttthead;

/**
 * 多选列选项
 * @author cleverstone
 * @since ym2.0
 */
class Checkbox extends TheadColumnOption
{
    /**
     * @var array
     */
    private $_options = [
        'field' => '__checkbox',    // 列字段
        'style' => '',              // 单元格样式
    ];

    /**
     * @param array|string $style 单元格样式
     * @return $this
     */
    public function style($style)
    {
        $this->_options = $style;
        return $this;
    }

    /**
     * @return array
     */
    public function _toArray()
    {
        return $this->_options;
    }
}